/*
 * Copyright (C) 2012 TopCoder Inc., All Rights Reserved.
 */
package com.ibm.dst.capacity.services.impl;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * <p>
 * Unit tests for class <code>XSeriesReportServiceImpl</code>.
 * </p>
 *
 * @author TCSDEVELOPER
 * @version 1.0
 */
public class XSeriesReportServiceImplTest {
    /**
     * <p>Represents the <code>XSeriesReportServiceImpl</code> instance used to test against.</p>
     */
    private XSeriesReportServiceImpl impl;

    /**
     * <p>
     * Set up the test environment.
     * </p>
     *
     * @throws Exception
     *             To JUnit.
     */
    @Before
    public void setUp() throws Exception {
        impl = new XSeriesReportServiceImpl();
    }

    /**
     * <p>
     * Tear down the test environment.
     * </p>
     *
     * @throws Exception
     *             To JUnit.
     */
    @After
    public void tearDown() throws Exception {
        impl = null;
    }

    /**
     * <p>
     * Accuracy test for the constructor
     * <code>XSeriesReportServiceImpl()</code> .<br>
     * Instance should be created successfully.
     * </p>
     */
    @Test
    public void testXSeriesReportServiceImpl() {
        assertNotNull("The instance should be created successfully", impl);
    }

    /**
     * <p>
     * Accuracy test for the method <code>setEntityManager(EntityManager)</code> .<br>
     * Expects no error occurs.
     * </p>
     */
    @Test
    public void testSetEntityManager() {
        assertEquals("The initial value should be same as", null, impl.getEntityManager());
        EntityManager expectValue = new EntityManager();
        impl.setEntityManager(expectValue);
        assertSame("The method setEntityManager() doesn't work properly."
            + "the value of entityManager should be same as expectValue.",
            expectValue, TestHelper.getPrivateField(XSeriesReportServiceImpl.class, impl, "entityManager"));
    }

    /**
     * <p>
     * Accuracy test for the method <code>setAuditService(AuditService)</code> .<br>
     * Expects no error occurs.
     * </p>
     */
    @Test
    public void testSetAuditService() {
        assertEquals("The initial value should be same as", null, impl.getAuditService());
        AuditService expectValue = new AuditService();
        impl.setAuditService(expectValue);
        assertSame("The method setAuditService() doesn't work properly."
            + "the value of auditService should be same as expectValue.",
            expectValue, TestHelper.getPrivateField(XSeriesReportServiceImpl.class, impl, "auditService"));
    }

    /**
     * <p>
     * Accuracy test for the method <code>setLogger(Logger)</code> .<br>
     * Expects no error occurs.
     * </p>
     */
    @Test
    public void testSetLogger() {
        assertEquals("The initial value should be same as", null, impl.getLogger());
        Logger expectValue = new Logger();
        impl.setLogger(expectValue);
        assertSame("The method setLogger() doesn't work properly."
            + "the value of logger should be same as expectValue.",
            expectValue, TestHelper.getPrivateField(XSeriesReportServiceImpl.class, impl, "logger"));
    }

    /**
     * <p>
     * Accuracy test for the method <code>setLookupDataService(LookupDataService)</code> .<br>
     * Expects no error occurs.
     * </p>
     */
    @Test
    public void testSetLookupDataService() {
        assertEquals("The initial value should be same as", null, impl.getLookupDataService());
        LookupDataService expectValue = new LookupDataService();
        impl.setLookupDataService(expectValue);
        assertSame("The method setLookupDataService() doesn't work properly."
            + "the value of lookupDataService should be same as expectValue.",
            expectValue, TestHelper.getPrivateField(XSeriesReportServiceImpl.class, impl, "lookupDataService"));
    }
}
